﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IkeCode.WP7.HQReader.Model;

namespace IkeCode.WP7.HQReader.Interfaces
{
    /// <summary>
    /// Interface that contains Feed Data Service Contract
    /// </summary>
    public interface IFeedDataService
    {
        /// <summary>
        /// Get All Feeds that exists in Cache (IsolatedStorage)
        /// </summary>
        /// <param name="trySync">Try to sync all publishers</param>
        /// <param name="callback">Callback with List of IIcFeed result or Exception, in error cases</param>
        void GetAllFeeds(bool trySync, Action<Dictionary<IIcFeedPublisher, List<IIcFeed>>, Exception> callback);
        
        /// <summary>
        /// Get All feeds for publisher in cache and try to get online updates to store.
        /// </summary>
        /// <param name="trySync">Try to online sync</param>
        /// <param name="publisher">IIcFeedPublisher object</param>
        /// <param name="callback">Action to be executed</param>
        void GetFeeds(bool trySync, IIcFeedPublisher publisher, Action<List<IIcFeed>, Exception> callback);
    }
}
